﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0049)http://localhost:8080/HouseRent/page/register.jsp -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>云和租房 - 用户注册</TITLE>
    <META content="text/html; charset=utf-8" http-equiv=Content-Type>
    <LINK
            rel=stylesheet type=text/css href="../css/style.css">
    <META name=GENERATOR content="MSHTML 8.00.7601.17514">
    <SCRIPT type="text/javascript" src="scripts/jquery-1.8.3.js"></SCRIPT>
    <script src="scripts/jquery.validate.js" type="text/javascript"></script>
    <script src="scripts/validate-methods.js" type="text/javascript"></script>
    <style type="text/css">
        .error{
            color:red;
        }
    </style>
</HEAD>
<BODY>
<DIV id=header class=wrap>
    <DIV id=logo><IMG src="../images/logo.gif"></DIV>
</DIV>
<DIV id=regLogin class=wrap>
    <DIV class=dialog>
        <DL class=clearfix>
            <DT>新用户注册</DT>
            <DD class=past>填写个人信息</DD>
        </DL>
        <DIV class=box>
            <FORM action="user_register" id="regForm" method="post">
                <DIV class=infos>
                    <TABLE class=field>
                        <TBODY>
                        <TR>
                            <TD class=field>用 户 名：</TD>
                            <TD><INPUT class=text type=text name=name></TD>
                        </TR>
                        <TR>
                            <TD class=field>密　　码：</TD>
                            <TD><INPUT class=text type=password name=password></TD>
                        </TR>
                        <TR>
                            <TD class=field>确认密码：</TD>
                            <TD><INPUT class=text type=password name="rpassword"></TD>
                        </TR>
                        <TR>
                            <TD class=field>电　　话：</TD>
                            <TD><INPUT class=text type=text name=telephone></TD>
                        </TR>
                        <TR>
                            <TD class=field>用户姓名：</TD>
                            <TD><INPUT class=text type=text name=userName></TD>
                        </TR>
                        </TBODY>
                    </TABLE>
                    <DIV class=buttons>
                        <INPUT value=立即注册 type=submit >
                    </DIV>
                </DIV>
            </FORM>
        </DIV>
    </DIV>
</DIV>
<DIV id=footer class=wrap>
    <DL>
        <DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
        <DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD>
    </DL>
</DIV>
</BODY>

<script>
    $("#regForm").validate({
        rules: {
            name: {
                required: true,
                minlength: 3,
                maxlength: 16
            },
            password: {
                required: true,
                minlength: 6,
                maxlength: 10
            },
            rpassword: {
                required: true,
                equalTo: "#password"
            },
            telephone: {
                required: true,
                isMobile: true
            },
            userName: {
                required: true
            }
        },
        messages: {
            name: {
                required: "请输入用户名",
                minlength:"用户名最短3个字符",
                maxlength:"用户名最长16个字符"
            },
            password: {
                required: "请输入密码",
                minlength: "密码最短6个字符",
                maxlength: "密码最长10个字符"
            },
            rpassword: {
                required: "请输入重复密码",
                minlength:"重复密码最短6个字符",
                maxlength: "重复密码最长10个字符",
                equalTo: "两次密码不一致"
            },
            telephone: {
                required: "请输入手机号",
                isPhone: "请输入正确的手机号"
            },
            userName: {
                required: "请输入您的真实姓名"
            }
        },

        onkeyup: true,
        focusCleanup: true,/*如果是 true 那么当未通过验证的元素获得焦点时，移除错误提示。避免和 focusInvalid 一起用。*/
        success: "valid",
        errorElement:"span",
        onsubmit:true,
        // submitHandler: function (form) {
        //         form.submit();
        // }
    })
</script>
</HTML>
